package com.patter.demo.factory.abstracts;

import com.patter.demo.factory.Shape;

/**
 * @Author create by xcb 2023/1/29 14:19
 */
public class ColourFactory extends AbstractFactory {

    @Override
    public Colour getColour(String colour) {
        if (colour == null) {
            return null;
        }
        if (colour.equalsIgnoreCase("RED")) {
            return new Red();
        } else if (colour.equalsIgnoreCase("GREEN")) {
            return new Green();
        } else if (colour.equalsIgnoreCase("YELLOW")) {
            return new Yellow();
        } else {
            return null;
        }
    }

    @Override
    public Shape getShapes(String shape) {
        return null;
    }
}
